/*
 * @Author: wwj 3342930399@qq.com
 * @Date: 2024-02-29 09:36:43
 * @LastEditors: wwj 3342930399@qq.com
 * @LastEditTime: 2024-03-13 13:39:26
 * @FilePath: \vue\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from "vue";
import VueRouter from "vue-router";
import { HomeRoutes } from "@/views/User/route";
import { RouteLists } from "@/views/Main/route";
import { ErrorList } from "@/views/Error/route";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/User/login",
  },
  ...HomeRoutes,
  ...RouteLists,
  ...ErrorList,
  // {
  //   path: "/404",
  //   name: "notfound",
  //   component: () => import("@/views/Errors/NotFound.vue"),
  // },
  // {
  //   path: "/503",
  //   name: "badservice",
  //   component: () => import("@/views/Errors/BadService.vue"),
  // },
  {
    path: "*",
    redirect: "/notfound",
  },
];

const router = new VueRouter({
  routes,
  mode: "hash",
});

export default router;
